<html>

<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> 
  <!-- link rel="stylesheet" title="Default" href="http://acm.math.spbu.ru/~sk1/colorer/my.css" -->

  <link rel="stylesheet" href="http://acm.math.spbu.ru/~sk1/colorer1/xcode.css">
  <script src="http://acm.math.spbu.ru/~sk1/colorer1/highlight.pack.js"></script>
  <script>hljs.initHighlightingOnLoad();</script>

  <!--script src="http://acm.math.spbu.ru/~sk1/colorer/highlight.js"></script>
  <script src="http://acm.math.spbu.ru/~sk1/colorer/cpp.js"></script>
  <script>hljs.initHighlightingOnLoad();</script -->
</head>

<body>

<pre><code>
#include &lt;cstdio&gt;

const int maxn = (int)2e7;
const int maxp = (int)2e6;

int pn = 0, p[maxp], x[maxn];

int main()
{
  for (int i = 2; i &lt; maxn; i++)
  {
    if (x[i] == 0)
      p[pn] = i, x[i] = pn++;
    for (int j = 1; j &lt;= x[i] && p[j] * i &lt; maxn; j++)
      x[p[j] * i] = j;
  }

  printf("pn=%d\n", pn);
  return 0;
}

</code></pre>

</body>
</html>

<font style="visibility:hidden">
